function [Ric,Tic]=p3RT(Xi,Xc)
%calculates 3D relative pose between pointsets Xi and Xc
mi=mean(Xi');
mc=mean(Xc');
pi=Xi'-repmat(mi,length(Xi(1,:)),1);
pc=Xc'-repmat(mc,length(Xi(1,:)),1);
[u,s,v]=svd(pc'*pi);
Ric=u*v';
Tic=mc'-Ric*mi';
return;
